/**
 *        (c) 2006 JOVEN
 *
 *        http://www.joven.com.cn
 */

package me.cloudcat.develop.entity.configuration;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

import me.cloudcat.develop.entity.BaseEntity;

/**
 * 人员权限关系
 * @author ZZWang
 * @Time 2017年1月17日  下午2:55:24
 *
 */
@Entity
@Table(name = "tbl_role_permission")
//@SequenceGenerator(name="SEQ_STORE", sequenceName="TBL_ROLE_PERMISSION_ID_ASQ", allocationSize=1)
public class RolePermission extends  BaseEntity<RolePermission>{

	/**
	 * 
	 */
	private static final long serialVersionUID = 328263103203243255L;
	

    @ManyToOne(fetch=FetchType.EAGER)
	private Role role;
	
    @ManyToOne(fetch=FetchType.EAGER)
	private Permission permission;
    

	@Version
	private int version;
	

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Permission getPermission() {
		return permission;
	}

	public void setPermission(Permission permission) {
		this.permission = permission;
	}

}
